﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WF.DAL;

namespace WF.Model
{
    [Serializable]
    public class WF_ApplyTypeEntity : EntityBase<WF_ApplyType>
    {
        #region 构造函数

        public WF_ApplyTypeEntity() : base() { }
        public WF_ApplyTypeEntity(WF_ApplyType obj) : base(obj) { }
        #endregion

        #region 实现基类abstract属性

        public override string ID
        {
            get
            {
                return DbEntity.ApplyTypeID;
            }
            set
            {
                DbEntity.ApplyTypeID = value; this.SendPropertyChanged("ApplyTypeID");
            }
        }

        public override string DisplayName
        {
            get { return DbEntity.ApplyTypeID; }
        }

        #endregion

        #region Public 属性

        public string ApplyType
        {
            get
            {
                return DbEntity.ApplyType;
            }
            set
            {
                DbEntity.ApplyTypeID = value; this.SendPropertyChanged("ApplyTypeID");
            }
        }

        public string K2WorkflowName
        {
            get
            {
                return DbEntity.K2WorkflowName;
            }
            set
            {
                DbEntity.K2WorkflowName = value; this.SendPropertyChanged("K2WorkflowName");
            }
        }


        #endregion

        /// <summary>
        /// 从数据库对象创建逻辑对象
        /// </summary>
        /// <param name="job">数据库对象</param>
        /// <returns>逻辑对象</returns>
        [Obsolete("请使用 new WF_ApplyTypeEntity(obj) ")]
        public static WF_ApplyTypeEntity CreateEntityFromDb(WF_ApplyType obj)
        {
            if (null == obj) return null;
            WF_ApplyTypeEntity ret = new WF_ApplyTypeEntity(obj);
            return ret;
        }
    }
}
